package com.heima.article.controller;


import com.heima.article.entity.ApAuthor;
import com.heima.article.service.ApAuthorService;
import com.heima.model.article.dtos.AuthorDto;
import io.swagger.models.auth.In;
import org.omg.CORBA.INTERNAL;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * APP文章作者信息表 前端控制器
 * </p>
 *
 * @author HM
 * @since 2022-03-01
 */
@RestController
@RequestMapping("/api/v1/author")
public class ApAuthorController {
    @Autowired
    private ApAuthorService apAuthorService;
    //文章服务--保存作者信息
    @PostMapping("/save")
    public Integer save(@RequestBody AuthorDto dto){
        return apAuthorService.saveAuthor(dto);
    }

}

